<%@ page language="java" errorPage="/common/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib uri="http://www.shengruan.org/tags" prefix ="f"%> 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Pragma" content="no-cache">
<link href="../style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<c:url value='/admin/assets/js/jquery/jquery.js'/>"></script>
<script type="text/javascript" language="javascript">
// <![CDATA[
$(document).ready(function() {
<c:if test="${not empty requestScope.message}">
$("#infoSpan").html("<img src='<c:url value='/admin/assets/images/flag.gif'/>'><font color='#C00000'><c:out value='${requestScope.message}' escapeXml='false'/></font>");
</c:if>

});
// ]]>
</script>
</head>
<body class="main">
<table class="container" cellpadding="0" cellspacing="0">

<tr class="dark" valign="middle">
<td>
<form action="<c:url value='/admin/order/order-list.ac'/>" method="post" name="userOrderForm" id="userOrderForm" >
<input type="hidden" name="status" id="status" value="${requestScope.status}"/>
<table width="100%" border="0">
  <tr>
    <td>
    <!--<input class="button" type="button" value="新增" onClick="document.location='user/userEdit.jsp'">-->
    订单编号：<input type="text" name="orderNumber" id="orderNumber" size="31" maxlength="31" value="${requestScope.orderNumber}">&nbsp;
    &nbsp;时间段：
    <select name="ordersReport" id="ordersReport" style="width:200px">
  	<c:forEach var="ORDERS_REPORT_STATUS" items="${requestScope.ORDERS_REPORT_STATUS_MAP}">
         <c:choose>
             <c:when test="${ORDERS_REPORT_STATUS.key == requestScope.ordersReport}">
               <option value="${ORDERS_REPORT_STATUS.key}" selected><c:out value='${ORDERS_REPORT_STATUS.value}'/></option>
              </c:when> 
           <c:otherwise>
              <option value="${ORDERS_REPORT_STATUS.key}"><c:out value='${ORDERS_REPORT_STATUS.value}'/></option>
           </c:otherwise>
         </c:choose>
    </c:forEach>
  </select> 
  
  
    <input name="button" type="submit" class="button" id="button" value="查询" >
    </td>
    <td>
    
  
    </td>
  </tr>
<c:if test="${not empty requestScope.message}">
<tr class="dark" valign="middle">
<td align="center"><span id="infoSpan" class="infoSpan">&nbsp;</span></td>
</tr>
</c:if>
</table>
</form>
</td>
</tr>
<tr>
<td colspan="2"><table class="list" align="center" cellspacing="1" cellpadding="0">
<tr class="heading">
<td width=6%>订单编号</td>
<td width=11%>会员名</td>
<td width=10%>收件人姓名</td>
<td width=10%>收件人手机</td>
<td width=13%>下单时间</td>
<td width=9%>订单总金额</td>
<td width=12%>配送方式</td>
<td width=11%>省份</td>
<td width=10%>订单状态</td>
<td width=8%>&nbsp;</td>
</tr>
<c:forEach var="orders" items="${requestScope.ordersList}" varStatus="loop">
<tr <c:if test='${loop.count%2==0}'>class="odd"</c:if>>
  <td height="20"><c:out value='${orders.orderNumber}'/></td>
  <td height="20"><c:out value='${orders.userName}'/></td>
  <td><c:out value='${orders.recipientName}'/></td>
  <td><c:out value='${orders.mobileNumber}'/></td>
  <td><c:out value='${f:format(orders.creationTime)}'/></td>
  <td><fmt:formatNumber value="${orders.totalprice}" type="currency" pattern="￥0.00"/></td>
  <td title="<c:out value='${orders.shippingName}'/>"><c:out value='${fn:substring(orders.shippingName,"0","10")}'/>......</td>
  <td><c:out value='${orders.province}'/></td>
  <td height="20">
<c:choose>
 <c:when test="${orders.status == 0}">等待买家付款</c:when>
 <c:when test="${orders.status == 1}">等待卖家发货</c:when>
 <c:when test="${orders.status == 2}">等待买家确认收货</c:when>
 <c:when test="${orders.status == 3}">交易成功</c:when>
 <c:when test="${orders.status == 4}">取消</c:when>
 <c:when test="${orders.status == 5}">订单付款失败</c:when>
</c:choose>
  </td>
  <td height="20" class="action">
  &nbsp;<a href="<c:url value='/admin/order/order-getById.ac?id=${orders.id}'/>"><img src="<c:url value='/admin/images/edit.gif'/>" alt="编辑" title="编辑" border="0"></a>
  &nbsp;<a href="<c:url value='/admin/order/order-delete.ac?id=${orders.id}'/>" onClick="return confirm('确认删除吗？')"><img src="<c:url value='/admin/images/delete.gif'/>" alt="删除" title="删除" border="0"></a>
  <!--&nbsp;<a href=""><img src="<c:url value='/admin/images/reset.gif'/>" width="22" height="15" title="刷卡记录" border="0"></a></td>-->
</tr>
</c:forEach>
<tr ><td colspan="10" height="40"><div align="right"><shengruan:pager pager="${requestScope.pager}" url="/admin/order/order-list.ac" isSubmit="true" formName="userOrderForm"/></div></td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>

